<div ng-controller="UserDetailCtrl">
    <div class="modal-header">
        <button type="button" class="close" ng-click="cancel()"><span class="icon icon-close" aria-hidden="true"></span>
        </button>
        <h3 class="modal-title">
            <span class="font-bold" translate="user.title">User</span>
            <span class="font-bold" translate="common.details">Update</span>
        </h3>
    </div>
    <div class="modal-body">
        <form name="userForm" class="form-horizontal form-validation">
            <tabset class="tab-container">
                <tab heading="{{'user.basic' | translate}}">
                    <div class="row wrapper-xs">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.username">Username</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control no-border" ng-model="user.userName" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.realname">Real Name</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm" ng-model="user.realName" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.gender">gender</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" placeholder=""
                                   value="{{'user.gender.'+user.gender|translate}}" disabled style="cursor:default">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.ethnic">ethnic</span></label>
                        <div class="col-sm-4">
                            <input type="email" class="form-control input-sm" ng-model="user._race.race_Name" disabled
                                   style="cursor:default">
                        </div>
                    </div>
                    <div class="row wrapper-xs">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.mobilephone">Mobile</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm" ng-model="user.mobile_Phone" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.email">Email</span></label>
                        <div class="col-sm-4">
                            <input type="email" class="form-control input-sm" ng-model="user.email" disabled
                                   style="cursor:default">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.country">country</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._country.country_En_Name : user._country.country_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.province">province</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._province.loca_En_Name : user._province.loca_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.city">city</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._city.loca_En_Name : user._city.loca_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.county">county</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._county.loca_En_Name : user._county.loca_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.hosplevel">Hospital level</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._doctor._hosp._hospLevel.hospLevel_En_Name : user._doctor._hosp._hospLevel.hospLevel_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.hosp">Hospital</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._doctor._hosp.hosp_En_Name : user._doctor._hosp.hosp_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.dept">Department</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._doctor._dept.dept_En_Name : user._doctor._dept.dept_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.doctquali">Doctor Qualification</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control input-sm"
                                   value="{{selectLang == 'English' ? user._doctor._doctQuali.doctQuali_En_Name : user._doctor._doctQuali.doctQuali_Cn_Name}}"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="form-group" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.intro">Intro</span></label>
                        <div class="col-sm-10">
						<textarea rows="3" ng-model="user._doctor.doctor_Intro" class="form-control"
                                  style="overflow:auto;height:100px;max-height:100px;cursor:default"
                                  disabled></textarea>
                        </div>
                    </div>

                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.fee_recommend">fee_recommend</span></label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control input-sm" ng-model="user._doctor.fee_Recommend"
                                   autocomplete="off" style="cursor:default" disabled>
                        </div>
                    </div>

                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold"
                                                                    translate="user.fee_diag">fee_diag</span></label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control input-sm" ng-model="user._doctor.fee_Diag"
                                   autocomplete="off" style="cursor:default" disabled>
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.fee_solution">fee_solution</span></label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control input-sm" ng-model="user._doctor.fee_Solution"
                                   autocomplete="off" style="cursor:default" disabled>
                        </div>
                    </div>

                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.cost_surgery">cost_surgery</span></label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control input-sm" ng-model="user._doctor.cost_Surgery"
                                   autocomplete="off" style="cursor:default" disabled>
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.fee_surgery">fee_Surgery</span></label>
                        <div class="col-sm-4">
                            <input type="number" class="form-control input-sm" ng-model="user._doctor.fee_Surgery"
                                   autocomplete="off" style="cursor:default" disabled>
                        </div>
                    </div>

                </tab>
                <tab heading="{{'user.summary' | translate}}">
                    <div class="row wrapper-xs" ng-if="user.isDoctor">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.countOfPatient">Patient</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control no-border" ng-model="user.countOfPatient" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.countOfSend">Sending</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control no-border" ng-model="user.countOfSend" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isMedicalAdmin">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.countOfSelect">Selection</span></label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="" ng-model="user.countOfSelect"
                                   disabled style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs" ng-if="user.isSpecialist">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.countOfDiag">Diagnosis</span></label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="" ng-model="user.countOfDiag" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                    <div class="row wrapper-xs">
                        <label class="col-sm-2 control-label"><span class="font-bold" translate="user.loginTimes">loginTimes</span></label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control no-border" ng-model="user.loginTimes" disabled
                                   style="cursor:default" autocomplete="off">
                        </div>
                        <label class="col-sm-2 control-label">
                            <span class="font-bold" translate="user.loginUpdated" ng-if="user.loginTimes>0">loginUpdated</span>
                        </label>
                        <div class="col-sm-4" ng-if="user.loginTimes>0">
                            <input type="text" class="form-control" placeholder=""
                                   value="{{user.loginUpdated | date:'yyyy-MM-dd HH:mm'}}"
                                   style="cursor:default" autocomplete="off">
                        </div>
                    </div>
                </tab>
                <tab heading="{{'user.activity' | translate}}">
                    <table class="table table-striped b-t b-light">
                        <thead>
                        <tr class="panel-heading">
                            <th><span class="font-bold" translate="common.number">No.</span></th>
                            <th><span class="font-bold" translate="user.activity">Activity</span></th>
                            <th ng-if="!isSmart"><span class="font-bold" translate="user.activityDescription">Description</span>
                            </th>
                            <th ng-if="!isSmart"><span class="font-bold" translate="common.updated">updated</span></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="activity in activityList">
                            <td>{{ (page.currentPage-1)*page.itemsPerPage + $index + 1 }}</td>
                            <td>{{ 'user.activity.' + activity.userAct | translate}}</td>
                            <td ng-if="!isSmart">{{ activity.userAct_Desc }}</td>
                            <td ng-if="!isSmart">{{ moment(activity.updated).format('YYYY-MM-DD HH:mm') }}</td>
                        </tr>
                        </tbody>
                    </table>
                </tab>
            </tabset>
            <footer class="panel-footer text-right bg-light lter">
                <button ng-if="isFriend" class="btn btn-success" ng-click="addFriends(user.userId)"><span class="font-bold">加好友</span></button>
                <button ng-if="!isFriend" class="btn btn-danger" ng-click="deleteFriend(user.userId)"><span class="font-bold">删除好友</span></button>
                <button class="btn btn-default" ng-click="cancel()"><span class="font-bold" translate="common.close">Close</span>
                </button>
            </footer>
        </form>
    </div>
</div>
